package com.zbu.system.controller.user;

import com.zbu.common.core.comtroller.BaseController;
import com.zbu.common.core.domain.PageQueryDTO;
import com.zbu.common.core.domain.R;
import com.zbu.common.core.domain.TableDataInfo;
import com.zbu.system.domain.user.dto.UserDTO;
import com.zbu.system.domain.user.dto.UserQueryDTO;
import com.zbu.system.service.user.IUserService;
import jakarta.annotation.Resource;
import lombok.Getter;
import org.springframework.web.bind.annotation.*;

@RequestMapping("/user")
@RestController
public class UserController extends BaseController {
    @Resource
    private IUserService userService;
    @GetMapping("/list")
    public TableDataInfo list(UserQueryDTO userQueryDTO){
         return getTableDataInfo(userService.list(userQueryDTO));
    }
    @PutMapping("/updateStatus")
    private R<Void> updateStatus(@RequestBody UserDTO userDTO){
        return toR(userService.updateStatus(userDTO));
    }
}
